import com.gitee.feizns.dynamic.StringUtils;
import com.gitee.feizns.dynamic.bean.BeanUtils;
import lombok.Data;

/**
 * @author feizns
 * @since 2023/1/1
 */
public class Main {

    public static void main(String[] args) {
        @Data
        class A { int type_id = 1024; String type_name = "abc"; }

        @Data
        class B { int typeId = 1; }

        A a = new A();
        B b = new B();

        //（将原先type_id的值映射到typeId）输出的结果为：B(typeId=1024)
        System.out.println(BeanUtils.copyProperties(b, StringUtils::underlineToHump, a));
        //B(typeId=1024)
        System.out.println(b);
    }

}
